Multiprocessor resource optimization

ABSTRACT

Embodiments include a device and a method. In an embodiment, a method applies a first resource management strategy to a first resource associated with a first processor and executes an instruction block in a first processor. The method also applies a second resource management strategy to a second resource of a similar type as the first resource and executes the instruction block in a second processor. The method further selects a resource management strategy likely to provide a substantially optimum execution of the instruction group from the first resource management strategy and the second resource management strategy.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is related to, claims the earliest availableeffective filing date(s) from (e.g., claims earliest available prioritydates for other than provisional patent applications; claims benefitsunder 35 USC §119(e) for provisional patent applications), andincorporates by reference in its entirety all subject matter of thefollowing listed application(s) (the “Related Applications”) to theextent such subject matter is not inconsistent herewith; the presentapplication also claims the earliest available effective filing date(s)from, and also incorporates by reference in its entirety all subjectmatter of any and all parent, grandparent, great-grandparent, etc.applications of the Related Application(s) to the extent such subjectmatter is not inconsistent herewith. The United States Patent Office(USPTO) has published a notice to the effect that the USPTO's computerprograms require that patent applicants reference both a serial numberand indicate whether an application is a continuation or continuation inpart. Stephen G. Kunin, Benefit of Prior-Filed Application, USPTOElectronic Official Gazette, Mar. 18, 2003 athttp://www.uspto.gov/web/offices/com/sol/og/2003/week11/patbene.htm. Thepresent applicant entity has provided below a specific reference to theapplication(s) from which priority is being claimed as recited bystatute. Applicant entity understands that the statute is unambiguous inits specific reference language and does not require either a serialnumber or any characterization such as “continuation” or“continuation-in-part.” Notwithstanding the foregoing, applicant entityunderstands that the USPTO's computer programs have certain data entryrequirements, and hence applicant entity is designating the presentapplication as a continuation in part of its parent applications, butexpressly points out that such designations are not to be construed inany way as any type of commentary and/or admission as to whether or notthe present application contains any new matter in addition to thematter of its parent application(s).

RELATED APPLICATIONS

1. For purposes of the USPTO extra-statutory requirements, the presentapplication constitutes a continuation-in-part of United States Patentapplication entitled PROCESSOR RESOURCE MANAGEMENT, naming Bran Ferren;W. Daniel Hillis; Nathan P. Myhrvold; Clarence T. Tegreene; and LowellL. Wood, Jr. as inventors, U.S. Ser. No. ______, [Attorney Docket No.0805-027-001A-000000] filed Aug. 29, 2005.

For purposes of the USPTO extra-statutory requirements, the presentapplication constitutes a continuation-in-part of United States Patentapplication entitled PREDICTIVE PROCESSOR RESOURCE MANAGEMENT, namingBran Ferren; W. Daniel Hillis; William Mangione-Smith; Nathan P.Myhrvold; Clarence T. Tegreene; and Lowell L. Wood, Jr. as inventors,U.S. Ser. No. ______, [Attorney Docket No. 0805-027-002-000000] filedAug. 29, 2005.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a partial view of an exemplary device in whichembodiments may be implemented;

FIG. 2 illustrates an exemplary operational flow in which embodimentsmay be implemented;

FIG. 3 illustrates alternative embodiments of the operation 210 of FIG.2;

FIG. 4 illustrates alternative embodiments of the operation 220 of FIG.2;

FIG. 5 illustrates alternative embodiments of the operation 230 of FIG.2;

FIG. 6 illustrates alternative embodiments of the operational flow ofFIG. 2;

FIG. 7 illustrates an exemplary operational flow in which embodimentsmay be implemented;

FIG. 8 illustrates an exemplary operational flow in which embodimentsmay be implemented;

FIG. 9 illustrates alternative embodiments of the operation of FIG. 8;

FIG. 10 illustrates an exemplary embodiment of a device in whichembodiments may be implemented;

FIG. 11 illustrates a partial view of an exemplary operational flow inwhich embodiments may be implemented;

FIG. 12 illustrates alternative embodiments of the operation of FIG. 11;

FIG. 13 illustrates alternative embodiments of the operation of FIG. 11;

FIG. 14 illustrates alternative embodiments of the operational flow ofFIG. 11;

FIG. 15 illustrates a partial view of an exemplary operational flow inwhich embodiments may be implemented;

FIG. 16 illustrates a partial view of an exemplary operational flow inwhich embodiments may be implemented;

FIG. 17 illustrates alternative embodiments of the operation of FIG. 11;

FIG. 18 illustrates a partial view of an exemplary operational flow inwhich embodiments may be implemented; and

FIG. 19 illustrates alternative embodiments of the operation 920 of FIG.18.

DETAILED DESCRIPTION

In the following detailed description of exemplary embodiments,reference is made to the accompanying drawings, which form a parthereof. In the several figures, like referenced numerals identify likeelements. The detailed description and the drawings illustrate exemplaryembodiments. Other embodiments may be utilized, and other changes may bemade, without departing from the spirit or scope of the subject matterpresented here. The following detailed description is therefore not tobe taken in a limiting sense, and the scope of the claimed subjectmatter is defined by the appended claims.

FIG. 1 illustrates a partial view of an exemplary device 100 in whichembodiments may be implemented. The device includes a processor 110 anda hardware resource 120 associated with the processor. The hardwareresource may be any hardware resource associated and/or associatablewith a processor. In an embodiment, the hardware resource may includeone or more caches, illustrated as a cache 1 (121), a cache 2 (122), andthrough a cache N (123). Also, the hardware resource may include abranch predictor 124.

In another embodiment, the hardware resource 120 may include any otherresource associated with the processor, illustrated as other resource126. In a further embodiment, the hardware resource includes an off-chipresource, illustrated as an off-chip resource 128. For example, thecache 1 (121) may be an on-chip L1 cache and the cache 2 (122) may be anon-chip L2 cache. By way of further example, the off-chip resource 128may be an off-chip L2 cache.

The device also includes a resource manager 140, and/or a processorcontrol unit 150. The processor control unit 150 may be an element ofthe processor 110, or may be an element separate from the processor. Inan embodiment, the processor, the processor control unit, and at leastone of the hardware devices are formed in a single chip, illustrated asthe processor chip 101. In another embodiment, the processor is formedin a first chip and at least one of the hardware resources formed in asecond chip.

The resource manager 140 includes an operability to compare an executionof an instruction group pursuant to a first resource management policyapplied to the hardware resource and an execution of the instructiongroup pursuant to a second resource management policy applied to thehardware resource. The resource manager also includes an operability toselect from the first resource management policy and the second resourcemanagement policy a resource management policy likely to provide asubstantially optimum execution of the instruction group. The resourcemanager further includes an operability to associate the selectedresource management policy with the instruction group.

In an embodiment, an “instruction group” may include a functionalinstruction, a branching instruction, a memory instruction, and/or otherinstruction that may be executed by a processor. In another embodiment,an instruction group includes a statement or a portion of a statement ina program. In a further embodiment, an instruction group includes atleast two statements from a program. A program may include any type of aprogram, from several lines of instructions, to an application, and toan operating system. In an embodiment, an instruction group may includea decoded instruction, a translated instruction, and/or amicro-operation (a portion of a translated instruction).

In an embodiment, the hardware resource includes a hardware resourcelogically associated with the processor. In another embodiment, thehardware resource includes a hardware resource physically associatedwith the processor. In a further embodiment, the hardware resourceincludes a hardware resource managed by the processor. In an embodiment,the hardware resource managed by the processor includes at least one ofa memory, a cache, a bus, a register-file port, and a functional unit.

In an embodiment, the resource manager operable to compare includes aresource manager operable to compare according to preselected criterion.The preselected criterion includes at least one of a successfulcompletion of the instruction group, an unsuccessful completion of theinstruction group, an uncertain completion of the instruction group, anexception, a time to execute the instruction group, a successful hit, anunsuccessful hit, a hit ratio, correctly predicting a branch taken,incorrectly predicting a branch taken, correctly predicting a branch nottaken, and/or incorrectly predicting a branch not taken.

In another embodiment, the resource manager operable to select from thefirst resource management policy and the second resource managementpolicy a resource management policy likely to provide a substantiallyoptimum execution of the instruction group includes resource manageroperable to select a management policy likely to provide a substantiallyoptimum execution of the instruction group according to a preselectedcriterion. In an embodiment, the preselected criterion includes acriterion responsive to an output of the compare an execution of aninstruction group pursuant to a first resource management policy appliedto the hardware resource and an execution of the instruction grouppursuant to a second resource management policy applied to the hardwareresource. In a further embodiment, the preselected criterion includes acriterion responsive to at least one of a successful completion of theinstruction group, an unsuccessful completion of the instruction group,an uncertain completion of the instruction group, an exception, a timeto execute the instruction group, a successful hit, an unsuccessful hit,a hit ratio, correctly predicting a branch taken, incorrectly predictinga branch taken, correctly predicting a branch not taken, and/orincorrectly predicting a branch not taken.

In an embodiment, the resource manager operable to select from the firstresource management policy and the second resource management policy amanagement policy likely to provide a substantially optimum execution ofthe instruction group includes a resource manager operable to comparethe execution of the instruction group pursuant to the first managementpolicy and the execution of the instruction group pursuant to the secondmanagement policy applied to the resource.

In another embodiment, the first resource management policy includes anoptimistic management policy. In a further embodiment, the optimisticresource management policy includes an optimistic resource managementpolicy that assumes that the instruction group will execute in asubstantially optimal manner. In an embodiment, the optimistic resourcemanagement policy assumes that the instruction group will execute in asubstantially optimal manner includes an optimistic resource managementpolicy that assumes that less than a preselected level of at least oneerror will occur during execution of the instruction group. In a furtherembodiment, the at least one error includes an occurrence of at leastone of a hardware error, a fetch error, a memory error, a cache miss, asoftware error, an arithmetic overflow, a stale datum, a branchprediction error, an attempt to access forbidden memory, and/or aninability of an operating system to grant a request.

In an embodiment, the second resource management policy includes apessimistic resource management policy. In another embodiment, thepessimistic resource management policy includes a pessimistic resourcemanagement policy that assumes that the instruction group will executein a substantially sub-optimal manner. In a further embodiment, thepessimistic resource management policy assumes that the instructiongroup will execute in a substantially sub-optimal manner includes apessimistic resource management policy that assumes that greater than apreselected level of at least one error will occur during execution ofthe instruction group. In an embodiment, the at least one error includesat least one of a hardware error, a fetch error, a memory error, a cachemiss, a software error, an arithmetic overflow, a stale datum, a branchprediction error, an attempt to access forbidden memory, and/or aninability of an operating system to grant a request.

In another embodiment, the resource manager operable to select amanagement policy likely to provide a substantially optimum execution ofthe instruction group includes a resource manager operable to select amanagement policy likely to provide a substantially optimum execution ofthe instruction group according to a preselected criterion. In a furtherembodiment, the preselected criterion includes at least one of asuccessful completion of the instruction group, an unsuccessfulcompletion of the instruction group, an uncertain completion of theinstruction group, an exception, a time to execute the instructiongroup, a successful hit, an unsuccessful hit, a hit ratio, correctlypredicting a branch taken, incorrectly predicting a branch taken,correctly predicting a branch not taken, and/or incorrectly predicting abranch not taken.

In a further embodiment, the resource manager operable to select amanagement policy likely to provide a substantially optimum execution ofthe instruction group includes a resource manager operable to select amanagement policy predicted as likely to provide a substantially optimumexecution of the instruction group. In an embodiment, the resourcemanager operable to select a management policy likely to provide asubstantially optimum execution of the instruction group includes aresource manager operable to select a management policy predicted by aBayesian method as likely provide a substantially optimum execution ofthe instruction group. In another embodiment, the resource manageroperable to select a management policy predicted by a Bayesian method aslikely provide a substantially optimum execution of the instructiongroup includes resource manager operable to recall historical data froma ghost page. In a further embodiment, the resource manager operable toselect a management policy likely to provide a substantially optimumexecution of the instruction group includes a resource manager operableto select a management policy predicted by a heuristic as likely providea substantially optimum execution of the instruction group. In anembodiment, the resource manager operable to select a management policylikely to provide a substantially optimum execution of the instructiongroup includes a resource manager operable to select a management policypredicted by a learning algorithm as likely provide a substantiallyoptimum execution of the instruction group. In another embodiment, theassociate the selected resource management policy with the instructiongroup includes associate a ghost page indicative of the selectedresource management policy with the instruction group.

In an embodiment, a Bayesian method includes any methodologycorresponding to or derived from Bayesian theories. In anotherembodiment, a Bayesian method includes but is not limited to statistics,principles, models, applications, analysis, decisions, inferences,probabilistic modeling, probabilistic reasoning, networks, and/orapproaches based at least in part on the work of Thomas Bayes.

In operation, an embodiment provides an optimized configuration of theactual hardware resource 120 and the actual processor 110 when theprocessor is executing an instruction group. For example, the hardwareresource may include an L2 cache. The instruction group is executed bythe processor in two passes, a first pass includes application of thefirst resource management policy to the L2 cache, and a second passincludes application of the second resource management policy to the L2cache. The execution results are then compared. For example, acomparison may include parameters of execution time and cache misses.One of the two resource management policies is then selected as likelyto provide a better execution of the instruction group. The selectedresource management policy is then associated with the instruction groupin a manner allowing retrieval. The selected resource management policymay be saved in a manner allowing retrieval for a future application tothe cache when the processor is scheduled to run the instruction group.For example, the selected resource management policy may be saved in aghost page associated with at least a portion of the instruction group.

In another embodiment of an operation, the resource may include adynamic branch predictor, such as the branch predictor 124. As describedabove, the instruction group is executed by the processor in two passes,a first pass includes application of the first resource managementpolicy to the branch predictor, and a second pass includes applicationof the second resource management policy to the branch predictor. Theexecution results are then compared. For example, a comparison mayinclude branching operations correctly predicted. One of the tworesource management policies for branch prediction is then selected aslikely to provide a better execution of the instruction group. Theselected resource management policy is then associated with theinstruction group in a manner allowing retrieval. The selected resourcemanagement policy may be saved in a manner allowing retrieval for afuture application to the branch predictor when the processor isscheduled to run the instruction group.

FIG. 2 illustrates an exemplary operational flow 200 in whichembodiments may be implemented. In an embodiment, the operational flowmay be executed in the device 100 of FIG. 1. An operation 210 applies afirst management policy to a resource managed by a processor andexecuting an instruction block in the processor. An operation 220applies a second management policy to the resource and executing theinstruction block in the processor. An operation 230 selects amanagement policy likely to provide a substantially optimum execution ofthe instruction group from the first management policy and the secondmanagement policy.

FIG. 3 illustrates alternative embodiments of the operation 210 of FIG.2. The operation 212 selects the first management policy from at leasttwo candidate management policies. The operation 214 obtains a firstresult of the executing an instruction block in the processor. Theoperation 216 applies an optimistic management policy to the resource.The applying an optimistic management policy to the resource may includeapplying a resource management policy that assumes that less than apreselected level of at least one error will occur during an executionof the instruction group.

FIG. 4 illustrates alternative embodiments of the operation 220 of FIG.2. The operation 222 selects the second management policy from at leasttwo candidate management policies. The operation 224 obtains a secondresult of the executing an instruction block in the processor. Theoperation 226 applies a pessimistic management policy to the resource.The applying a pessimistic management policy to the resource may includeapplying a management policy that assumes that more than a preselectedlevel of at least one error will occur during an execution of theinstruction group.

FIG. 5 illustrates alternative embodiments of the operation 230 of FIG.2. The operation 232 selects a management policy likely to provide asubstantially optimum execution of the instruction group according to apreselected criterion. The operation 234 compares the execution of theinstruction group pursuant to the first management policy and theexecution of the instruction group pursuant to the second managementpolicy applied to the resource.

FIG. 6 illustrates alternative embodiments of the operational flow 200of FIG. 2. The operational flow 242 associates the selected managementpolicy with the instruction group. The operational flow 244 associates aghost page indicative of the selected management policy with theinstruction group.

In an alternative embodiment, the exemplary operational flow 200 mayinclude an iterative method where the operational flow 200 is repeatedat least twice to test at least three resource management policies, andallow a selecting from the at least three resource management policies.

Returning to FIG. 1, an alternative embodiment of the exemplary device100 includes the processor 110 having the hardware resource 120associated with the processor. In the alternative embodiment, theprocessor control unit 150 includes a processor control unit operable tocompare an execution of an instruction group pursuant to an optimisticresource management policy applied to the hardware resource and anexecution of the instruction group pursuant to a pessimistic resourcemanagement policy applied to the hardware resource. The alternativeembodiment of the processor control unit also includes a processorcontrol unit operable to select from the optimistic resource managementpolicy and the pessimistic resource management policy a resourcemanagement policy likely to provide a substantially optimum execution ofthe instruction group. The alternative embodiment of the processorcontrol unit further includes a resource manager operable to associatethe selected resource management policy with the instruction group. Inan embodiment, the processor and the processor control unit are formedon a single chip.

In a further embodiment, the optimistic resource management policyassumes that the instruction group will execute in a substantiallyoptimal manner. In another embodiment, the optimistic resourcemanagement policy assumes that the instruction group will execute in asubstantially optimal manner includes an optimistic resource managementpolicy that assumes that less than a preselected level of at least oneerror will occur during execution of the instruction group. In anembodiment, the at least one error includes an occurrence of at leastone of a hardware error, a fetch error, a memory error, a cache miss, asoftware error, an arithmetic overflow, a stale datum, a branchprediction error, an attempt to access forbidden memory, and/or aninability of an operating system to grant a request.

In an embodiment, the pessimistic resource management policy assumesthat the instruction group will execute in a substantially sub-optimalmanner. In another embodiment, the pessimistic resource managementpolicy assumes that the instruction group will execute in asubstantially sub-optimal manner includes a pessimistic resourcemanagement policy that assumes that greater than a preselected level ofat least one error will occur during execution of the instruction group.In a further embodiment, the at least one error includes at least one ofa hardware error, a fetch error, a memory error, a cache miss, asoftware error, an arithmetic overflow, a stale datum, a branchprediction error, an attempt to access forbidden memory, and/or aninability of an operating system to grant a request.

FIG. 7 illustrates an exemplary operational flow 300 in whichembodiments may be implemented. The operation 310 applies an optimisticcache management policy to a cache managed by a processor, executing aninstruction block in the processor, and acquiring a context of theexecution while the optimistic cache management policy is applied. Theoperation 320 applies a pessimistic cache management policy to thecache, executing the instruction block in the processor, and acquiring acontext of the execution while the pessimistic cache management policyis applied. The operation 330 selects a cache management policy likelyto provide a substantially optimum execution of the instruction groupfrom the optimistic cache management policy and the pessimistic cachemanagement policy. The operation 340 associates a ghost page indicativeof the selected cache management policy and of the context of theexecution during application of the selected cache management policywith the instruction group.

Further returning to FIG. 1, another alternative embodiment of theexemplary device 100 includes the processor 110 having the hardwareresource 120 associated with the processor. In the alternativeembodiment, the processor control unit 150 includes a processor controlunit operable to fetch an instruction to be executed in the processor.In an embodiment, the operation to fetch the instruction to be executedin the processor may include facilitating the operation to fetch theinstruction to be executed in the processor. In another embodiment, theoperation to fetch the instruction to be executed in the processor mayinclude issuing a signal timing the operation to fetch the instructionto be executed in the processor. The processor control unit is alsooperable to receive a previously selected resource management policyassociated with the instruction, the resource management policy havingbeen selected as likely to provide a substantially optimum execution ofan instruction group that includes the instruction, and having beenselected from a optimistic resource management policy and a pessimisticresource management policy. The processor control unit is furtheroperable to apply the previously selected resource management policy tothe resource. In another alternative embodiment, the processor controlunit is also operable to enable the processor to execute theinstruction. In a further alternative embodiment, the processor controlunit is operable to enable the processor to execute the instruction, andapply another resource management policy to the hardware resource.

In operation, an embodiment obtains a previously selected optimizedconfiguration of the hardware resource 120 for the processor 110 inconjunction with executing the instruction group. When the processor ispreparing to execute an instruction group, the processor control unitreceives a previously selected resource management policy associatedwith the instruction. In an embodiment, the previously selected resourcemanagement policy may include a previously selected resource managementpolicy provided by the method 200 of FIG. 2 and/or the method 300 ofFIG. 7. For example, the hardware resource may include the branchpredictor 124, and the previously selected resource management policymay include a previously selected resource management policy selected aslikely to provide a substantially optimum execution of the instruction.The processor control unit applies the previously selected resourcemanagement policy to the hardware resource, such as the branchpredictor. The instruction is executed by the processor with thehardware resource, such as the branch predictor, managed by thepreviously selected resource management policy. This is expected toprovide an optimized execution of the instruction over an execution ofthe instruction with a resource management policy applied to thehardware resource that is not likely to provide a substantially optimumexecution of the instruction group.

FIG. 8 illustrates an exemplary operational flow 400 in whichembodiments may be implemented. An operation 410 fetches an instructionto be executed in a central processor unit having an associatedresource. An operation 420 receives a previously selected resourcemanagement policy associated with the instruction. The resourcemanagement policy having been selected as likely to provide asubstantially optimum execution of an instruction group that includesthe instruction, and having been selected from a optimistic resourcemanagement policy and a pessimistic resource management policy. Anoperation 430 applies the previously selected resource management policyto the resource. An operation 440 executes the instruction in thecentral processor unit. In a further alternative embodiment, anoperation (not shown) executes the instruction in the central processorunit and then applies another resource management policy to the hardwareresource.

FIG. 9 illustrates alternative embodiments of the operation 410 of FIG.8. An operation 412 fetches an instruction to be executed in a centralprocessor unit having an associated cache resource. An operation 416fetches an instruction to be executed in a central processor unit havingan associated branch predictor resource. In an alternative embodiment ofthe operation 410, at an operation 414, the associated cache resourceincludes one of an on-chip cache or an off-chip cache.

FIG. 10 illustrates an exemplary embodiment of a device 500 in whichembodiments may be implemented. The device includes a first processor510, a second processor 514, and a N^(th) Processor 518. The device alsoincludes at least one hardware resource 220 associated with theprocessor. The at least one hardware resource may be any hardwareresource associated and/or associatable with a processor. In anembodiment, the at least one hardware resource includes a first cache521 associated with the first processor and a second cache 522associated with the second processor. In another embodiment, the atleast one hardware resource may include an N^(th) cache 524, a firstbranch predictor 526, an second branch predictor 527, other resource(s)528, and an off-processor-chip resource 529. The device also includes acache manager 540 operable to manage the caches 521, 522, and 524, and ahardware resource manager operable to manage other hardware, such as thebranch predictor, the other resource(s), and the off-processor-chipresource(s).

The device 500 also includes a cache manager 540 implemented in ahardware-logic. The cache manager is operable to compare an execution ofan instruction group by the first processor 510 while a first cachemanagement policy is applied to the first cache 521 and an execution ofthe instruction group by the second processor 514 while a second cachemanagement policy is applied to the second cache 522. The cache manageris also operable to select a cache management policy likely to provide asubstantially optimum execution of the instruction group from the firstcache management policy and the second cache management policy. Thecache manager is further operable to associate the selected cachemanagement policy with the instruction group.

In an embodiment, the first processor 510 and the second processor 514are implemented on a single chip. In another embodiment the first cache521 and the second cache 522 are a logical partition of a physicalmemory 523. In a further embodiment, the first cache and second cacheare accessible by both the first and second processor. In an embodiment,the first cache includes an L2 cache and the second cache includes an L2cache. In another embodiment, the first processor and the cache managerare formed on a single chip 501.

In an embodiment, the cache manager operable to associate the selectedcache management policy with the instruction group includes a cachemanager operable to associate a ghost page indicative of the selectedmanagement policy with the instruction group. In a further embodiment,the cache manager operable to compare includes a cache manager operableto compare according to preselected criterion. In an embodiment, thepreselected criterion includes at least one of a successful completionof the instruction group, an unsuccessful completion of the instructiongroup, an uncertain completion of the instruction group, an exception, atime to execute the instruction group, a successful hit, an unsuccessfulhit, a hit ratio, correctly predicting a branch taken, incorrectlypredicting a branch taken, correctly predicting a branch not taken,and/or incorrectly predicting a branch not taken.

In an embodiment, the first cache management policy assumes that theinstruction group will execute in a substantially optimal manner. Inanother embodiment, the first cache management policy that assumes thatthe instruction group will execute in a substantially optimal mannerincludes a first cache management policy that assumes that less than apreselected level of at least one error will occur during execution ofthe instruction group. In a further embodiment, the at least one errorincludes an occurrence of at least one of a hardware error, a fetcherror, a memory error, a cache miss, a software error, an arithmeticoverflow, a stale datum, a branch prediction error, an attempt to accessforbidden memory, and/or an inability of an operating system to grant arequest.

In an embodiment, the second cache management policy assumes that theinstruction group will execute in a substantially sub-optimal manner. Inanother embodiment, the second cache management policy assumes that theinstruction group will execute in a substantially sub-optimal mannerincludes a second cache management policy that assumes that greater thana preselected level of at least one error will occur during execution ofthe instruction group. In a further embodiment, the at least one errorincludes at least one of a hardware error, a fetch error, a memoryerror, a cache miss, a software error, an arithmetic overflow, a staledatum, a branch prediction error, an attempt to access forbidden memory,and/or an inability of an operating system to grant a request.

In an embodiment, the cache manager operable to select a managementpolicy likely to provide a substantially optimum execution of theinstruction group includes a cache manager operable to select amanagement policy likely to provide a substantially optimum execution ofthe instruction group according to a preselected criterion. In anotherembodiment, the preselected criterion includes at least one of asuccessful completion of the instruction group, an unsuccessfulcompletion of the instruction group, an uncertain completion of theinstruction group, an exception, a time to execute the instructiongroup, a successful hit, an unsuccessful hit, a hit ratio, correctlypredicting a branch taken, incorrectly predicting a branch taken,correctly predicting a branch not taken, and/or incorrectly predicting abranch not taken.

In an embodiment, the cache manager operable to select a managementpolicy likely to provide a substantially optimum execution of theinstruction group includes a cache manager operable to select amanagement policy predicted as likely to provide a substantially optimumexecution of the instruction group. In another embodiment, the cachemanager operable to select a management policy likely to provide asubstantially optimum execution of the instruction group includes acache manager operable to select a management policy predicted by aBayesian method as likely provide a substantially optimum execution ofthe instruction group. In a further embodiment, the cache manageroperable to select a management policy predicted by a Bayesian method aslikely provide a substantially optimum execution of the instructiongroup includes cache manager operable to recall historical data from aghost page.

In an embodiment, the cache manager operable to select a managementpolicy likely to provide a substantially optimum execution of theinstruction group includes a cache manager operable to select amanagement policy predicted by a heuristic as likely provide asubstantially optimum execution of the instruction group. In anotherembodiment, the cache manager operable to select a management policylikely to provide a substantially optimum execution of the instructiongroup includes a cache manager operable to select a management policypredicted by a learning algorithm as likely provide a substantiallyoptimum execution of the instruction group.

In operation, an embodiment of the device 500 provides an optimizationof a processor and a cache when executing an instruction group. Forexample, when the first cache 521 and the second cache 522 are logicalpartitions of a physical memory, different cache management policies maybe tried for the instruction group. The execution results of theinstruction group are compared, and a cache management policy selectedthat provides a substantially optimum execution selected in response tothe comparison. For example, the first and second management policiesmay provide different cache sizes. The instruction group may be executedon both processors while the different cache sizes are applied to thefirst cache and the second cache. The executions are compared, and acache management policy selected that works better, i.e., provides asubstantially optimum execution of the instruction group. In anotherexample, the first and second management policies may provide differentflush rates. A selected cache management policy is associated with theinstructions group, for example by using a ghost page, for a use in afuture execution of the instruction group.

Continuing with FIG. 10, FIG. 10 illustrates another exemplaryembodiment of a device 500 in which an embodiment may be implemented.The device includes a first processor 510 having an associated firsthardware resource and a second processor 514 having an associated secondhardware resource. In an embodiment, the associated first hardwareresource includes a first branch predictor 526 and the associated secondhardware resource includes a second branch predictor 527. In anotherembodiment, the first and second hardware resources may include amemory, a bus, a register-file port, and/or a function unit, which arecollectively illustrated as other resource(s) 528 and/or off-chipresource(s) 529.

The device 500 also includes hardware resource manager 542 implementedin a hardware-logic. The resource manager is operable to compare anexecution of an instruction group by the first processor 510 while afirst resource management policy is applied to the first hardwareresource and an execution of the instruction group by the secondprocessor 527 while a second resource management policy is applied tothe second hardware resource. Continuing with an above example, thefirst hardware resource may include the first branch predictor 526 andthe second hardware resource includes the second branch predictor 527.In an alternative embodiment, the first hardware resource includes afirst off-processor-chip cache and the second hardware resource includesa second off-processor-chip cache 529.

The resource manager is also operable to select from the first resourcemanagement policy and the second resource management policy a resourcemanagement policy likely to provide a substantially optimum execution ofthe instruction group. The resource manager is further operable toassociate the selected resource management policy with the instructiongroup. In an embodiment, the resource manager is associated with thefirst processor. In another embodiment, the resource manager isassociated with the first processor and the second processor.

FIG. 11 illustrates a partial view of an exemplary operational flow 550in which embodiments may be implemented. In an embodiment, theoperational flow may be executed in the device 500 of FIG. 10. Anoperation 560 applies a first resource management strategy to a firstresource associated with a first processor and executing an instructionblock in the first processor. An operation 570 applies a second resourcemanagement strategy to a second resource of a similar type as the firstresource and executing the instruction block in the second processor. Anoperation 580 selects a resource management strategy likely to provide asubstantially optimum execution of the instruction group from the firstresource management strategy and the second resource managementstrategy.

FIG. 12 illustrates alternative embodiments of the operation 560 of FIG.11. An operation 562 applies a first resource management strategy to afirst resource associated with a first processor includes applying afirst resource management strategy to a cache associated with a firstprocessor. An operation 564 applies a first resource management strategyto a first resource associated with a first processor includes applyinga first resource management strategy to a register associated with afirst processor. An operation 566 applies a first resource managementstrategy to a first resource associated with a first processor includesapplying a first resource management strategy to a functional unitassociated with a first processor. An operation 568 applies a firstresource management strategy to a branch predictor associated with afirst processor.

FIG. 13 illustrates alternative embodiments of the operation 580 of FIG.11. An operation 582 selects a resource management strategy likely toprovide a substantially optimum execution of the instruction groupaccording to preselected criterion. In an alternative embodiment, theoperation 582 may include an operation 584. At the operation 584, thepreselected criterion includes at least one of a successful completionof the instruction group, an unsuccessful completion of the instructiongroup, an uncertain completion of the instruction group, an exception, atime to execute the instruction group, a successful hit, an unsuccessfulhit, a hit ratio, correctly predicting a branch taken, incorrectlypredicting a branch taken, correctly predicting a branch not taken,and/or incorrectly predicting a branch not taken. An operation 586applies a first resource management strategy to a first resourceassociated with a first processor includes applying an optimisticresource management strategy to a first resource associated with a firstprocessor. In an alternative embodiment, the operation 586 may includean operation 588. At the operation 588, the optimistic resourcemanagement strategy assumes that the instruction group will execute in asubstantially optimal manner. An operation 590 applies a pessimisticresource management strategy to a second resource of a similar type asthe first resource. In an alternative embodiment, the operation 590 mayinclude an operation 592. At the operation 592, the pessimistic resourcemanagement strategy assumes that the instruction group will execute in asubstantially sub-optimal manner.

FIG. 14 illustrates alternative embodiments 595 of the operational flow550 of FIG. 11. An operation 596 associates the selected resourcemanagement strategy with the instruction group. An operation 598associates a ghost page indicative of the selected resource managementstrategy with the instruction group.

FIG. 15 illustrates a partial view of an exemplary operational flow 600in which embodiments may be implemented. An operation 610 applies anoptimistic cache management strategy to a first cache associated with afirst processor, executing an instruction block in the first processor,and acquiring a context of the first processor execution. An operation620 applies a pessimistic cache management strategy to a second cacheassociated with a second processor, executing the instruction block inthe second processor, and acquiring a context of the second processorexecution. An operation 630 selects from the optimistic cache managementstrategy and the pessimistic cache management strategy a cachemanagement strategy likely to provide a substantially optimum executionof the instruction group. An operation 640 associates the instructiongroup with a ghost page indicative of the selected cache managementstrategy and of the context of the execution during the application ofthe selected cache management strategy.

Returning to FIG. 10, FIG. 10 also illustrates a further exemplaryembodiment of the device 500. The device includes a processor, such asthe first processor 510, having an associated first hardware resource,such as the first branch predictor 526, and a present context. Thedevice also includes a control unit associated with the first processorcore, such as for example the cache manager 540 or the hardware resourcemanager 542. The control unit is operable to fetch an instruction forexecution by the processor. The control unit is also operable to receivea previously selected resource management policy associated with theinstruction, the resource management policy selected as likely toprovide a substantially optimum execution of an instruction group thatincludes the instruction, and further selected from a optimisticresource management policy and a pessimistic resource management policy.The control unit is further operable to apply the previously selectedresource management policy to the resource, and cause the processor toexecute the instruction.

In an alternative embodiment, the control unit operable to apply thepreviously selected resource management policy to the resource includesa control unit operable to apply the previously selected resourcemanagement policy only if a predetermined similarity exists between thepresent context of the processor and the context existing when theselected resource management policy was selected. Otherwise, the controlunit does not apply the previously selected resource management policyto the resource.

FIG. 16 illustrates a partial view of an exemplary operational flow 700in which embodiments may be implemented. In an embodiment, theoperational flow may be executed in the device 500 of FIG. 10. Inanother embodiment, an operation 710 fetches an instruction to beexecuted by a processor core of a chip having at least two processorcores that each have access to a resource. An operation 720 receives apreviously selected resource management policy associated with theinstruction. The resource management policy having been selected aslikely to provide a substantially optimum execution of an instructiongroup that includes the instruction, and having further been selectedfrom a optimistic resource management policy and a pessimistic resourcemanagement policy. An operation 730 applies the previously selectedresource management policy to the resource. An operation 740 executesthe instruction by the processor core.

FIG. 17 illustrates alternative embodiments of the operation 710 of FIG.11. An operation 712 fetches an instruction to be executed by aprocessor core of a chip having at least two processor cores that eachhave an access to a cache resource. In another embodiment, the operation712 includes an operation 714, where cache resource includes one of anon-chip cache or an off-chip cache. An operation 716 fetches aninstruction to be executed by a processor core of a chip having at leasttwo processor cores that each have access to a branch predictor. Inanother embodiment, the operation 716 includes an operation 718, wherethe branch predictor includes static branch predictor or a dynamicbranch predictor.

Returning to FIG. 1, an alternative embodiment of the exemplary device100 includes the processor 110 and the processor-associated hardwareresource 120. The processor is operable to execute an instruction group.The resource manager 140 is operable to implement a resource managementpolicy for the hardware resource with respect to an execution of theinstruction group, the resource management policy responsive to aprediction of a performance of the hardware resource based at least inpart on a historical performance of the hardware resource.

In an embodiment, the processor and the associated hardware resource areformed on a single chip. In another embodiment, the processor andresource manager are formed on a single chip. In a further embodiment,the hardware resource includes a cache, such as the cache 1 (121) or anoff-chip cache illustrated as the off-chip resource 128. In anembodiment, the hardware resource includes a logical partition of acache, such as the first cache 521 of the physical memory device 523 ofFIG. 10. In another embodiment, the hardware resource includes thebranch predictor 124, which may be a dynamic branch predictor. In afurther embodiment, the hardware resource includes a hardware resourcelogically associated with the processor. In an embodiment, the hardwareresource includes a hardware resource physically associated with theprocessor. In another embodiment, the hardware resource associated withthe processor includes a hardware resource controlled by the processor.

In an embodiment, the resource management policy responsive to aprediction of a future performance of the hardware resource based atleast in part on a historical performance of the hardware resourceincludes a resource management policy responsive to a prediction of afuture performance of the hardware resource based at least in part on ahistorical performance of the hardware resource during an execution ofthe instruction group. By way of illustrative example, in an embodiment,a historical performance of the hardware resource may include a branchbeing taken an average 90% of the time over 1000 executions of theinstruction group. The resource management policy may then include aprediction that the branch is taken. In another embodiment, the resourcemanagement policy responsive to a prediction of a performance of thehardware resource based at least in part on a historical performance ofthe hardware resource includes a resource management policy responsiveto a prediction of a performance of the hardware resource based at leastin part on a historical performance of the hardware resource and anindicia of confidence. Continuing with the above illustrative example,an indicia of confidence may include a high indicia of confidencebecause the branch has been taken 99% of the time in the last 10executions of the instruction group. The resource management policy maythen include a prediction that the branch is taken unless two subsequentinstances of branch prediction error occur, resulting in a low indiciaof confidence. Alternatively, an indicia of confidence may include a lowindicia of confidence because the branch has been taken only 15% of thetime in the last 10 executions of the instruction group. The resourcemanagement policy may then include a prediction that the branch is nevertaken. In another embodiment, the resource management policy responsiveto a prediction of a performance of the hardware resource based at leastin part on a historical performance of the hardware resource includes aresource management policy responsive to a prediction of a performanceof the hardware resource based at least in part on a historicalperformance of the hardware resource and a saved indicia of confidencein the prediction of a performance of the hardware resource.

In a further embodiment, the resource management policy formulated inresponse to a prediction of a performance of the hardware resource basedat least in part on a historical performance of the hardware resourceincludes a resource management policy formulated in response to aprediction of a performance of the hardware resource as likely toprovide a substantially optimum execution of the instruction group. Forexample, the hardware resource may include a cache and the resourcemanagement policy includes a cache flush rate. In an embodiment, theresource management policy formulated in response to a prediction of aperformance of the hardware resource based at least in part on ahistorical performance of the hardware resource includes a resourcemanagement policy formulated in response to a prediction of aperformance of the hardware resource as likely to provide asubstantially optimum execution of the instruction group as measured bya preselected criterion. In a further embodiment, the preselectedcriterion includes at least one of a successful completion of theinstruction group, an unsuccessful completion of the instruction group,an uncertain completion of the instruction group, an exception, a timeto execute the instruction group, a successful hit, an unsuccessful hit,a hit ratio, correctly predicting a branch taken, incorrectly predictinga branch taken, correctly predicting a branch not taken, and/orincorrectly predicting a branch not taken.

In an embodiment, the resource management policy formulated in responseto a prediction of a performance of the hardware resource based at leastin part on a historical performance of the hardware resource includes aresource management policy formulated in response to a prediction of aperformance of the hardware resource based at least in part on aBayesian method. In another embodiment, the resource management policyformulated in response to a prediction of a performance of the hardwareresource based at least in part on a historical performance of thehardware resource includes a resource management policy formulated inresponse to a prediction of a performance of the hardware resource basedat least in part on a heuristic algorithm. In a further embodiment, theresource management policy formulated in response to a prediction of aperformance of the hardware resource based at least in part on ahistorical performance of the hardware resource includes a resourcemanagement policy formulated in response to a prediction of aperformance of the hardware resource based at least in part on alearning algorithm. In an embodiment, the resource manager includes aresource manager operable to recall historical data from a ghost page.

In another embodiment, the device 100 further includes a storage deviceoperable to save the historical performance of the hardware resource. Ina further embodiment, the storage device operable to save the historicalperformance of the hardware resource includes a storage device operableto save the historical performance of the hardware resource and ameasure of confidence in a prediction based on the historicalperformance.

FIG. 18 illustrates a partial view of an exemplary operational flow 900in which embodiments may be implemented. In an embodiment, theoperational flow may be executed in the device 900 of FIGS. 1 and/or 10.In another embodiment, an operation 910 receives a historicalperformance indicia of a hardware resource associated with a processoroperable to execute an instruction group. An operation 920 predicts afuture performance of the hardware resource based at least in part onthe historical performance indicia of the hardware resource. Anoperation 930 establishes a resource management policy responsive to thepredicting a future performance of the hardware resource. An operation940 implements the resource management policy in the hardware resourcefor an execution of the instruction group by the processor.

FIG. 19 illustrates alternative embodiments of the operation 920 of FIG.18. An operation 922 predicts a future performance of the hardwareresource at least in part based on the historical performance indicia ofthe hardware resource corresponding to an execution of the instructiongroup. An operation 924 predicts a future performance of the hardwareresource based at least in part on the historical performance of thehardware resource and a confidence indicia.

Other embodiments are directed toward utilizing and/or optimizing datahandling, which may be by a data class. In some instances, a data classincludes certain data items (datum, byte, bit, a block of things thatare associated together) that are used once and never again. In otherinstances, a data class includes certain data items are used constantlybut never written and/or infrequently written. In further data classes,data items are constantly read and written to, or other data items areoften being written but never read. A data manager (which may/may not beassociated with and/or part of a resource manager) predicts how certaindata classes will likely be used in the future and/or saves the dataitems in a manner and/or a location that substantially optimizesutilization of the data items by an instruction group and/or storage ofthe data items by the computing device. Any suitable type of predictivealgorithm providing meaningful results may be used, including apredictive algorithm based on a Bayesian method, and/or a learningalgorithm. The prediction may be written to a ghost page associated witha piece of data. A prediction may be straight forward if it is knownthat the data piece will never be written or read. Each data item willexpose what its peculiar flavor is. This may be implemented down to thesize of a single cache line, or even below the cache line.

An embodiment provides storage mobility for data items that areassociated together in a substantial disequilibrium based upon a sharedfate, a shared nature, an entanglement to a page and/or line ofsimilarly handled data. The data item may include one or more extra bits(tag) on end of a data item that may indicate its size, nature (writtenbut never read, read but never written, read once in the life of theprogram, used by at least two threads). In a further embodiment, anindicator may say which code relates with to the data item. This may beused for doing storage assignment. For example, if the data itemincludes a semaphore that is used across multiple threads, that shouldbe known and the data item managed accordingly. Most data is associatedwith a particular body of code and assigned to a storage unit together.By watching that, these assignments can be done together between theI-cache and the D-cache.

The foregoing detailed description has set forth various embodiments ofthe devices and/or processes via the use of block diagrams, flowdiagrams, operation diagrams, flowcharts, illustrations, and/orexamples. Insofar as such block diagrams, operation diagrams,flowcharts, illustrations, and/or examples contain one or more functionsand/or operations, it will be understood by those within the art thateach function and/or operation within such block diagrams, operationdiagrams, flowcharts, illustrations, or examples can be implemented,individually and/or collectively, by a wide range of hardware, software,firmware, or virtually any combination thereof.

In addition, those skilled in the art will appreciate that themechanisms of the subject matter described herein are capable of beingdistributed as a program product in a variety of forms, and that anillustrative embodiment of the subject matter described herein appliesequally regardless of the particular type of signal bearing media usedto actually carry out the distribution. Examples of a signal bearingmedia include, but are not limited to, the following: recordable typemedia such as floppy disks, hard disk drives, CD ROMs, digital tape, andcomputer memory; and transmission type media such as digital and analogcommunication links using TDM or IP based communication links (e.g.,packet links).

It will be understood by those within the art that, in general, termsused herein, and especially in the appended claims (e.g., bodies of theappended claims) are generally intended as “open” terms (e.g., the term“including” should be interpreted as “including but not limited to,” theterm “having” should be interpreted as “having at least,” the term“includes” should be interpreted as “includes but is not limited to,”etc.). It will be further understood by those within the art that if aspecific number of an introduced claim recitation is intended, such anintent will be explicitly recited in the claim, and in the absence ofsuch recitation no such intent is present. For example, as an aid tounderstanding, the following appended claims may contain usage of theintroductory phrases “at least one” and “one or more” to introduce claimrecitations. However, the use of such phrases should not be construed toimply that the introduction of a claim recitation by the indefinitearticles “a” or “an” limits any particular claim containing suchintroduced claim recitation to inventions containing only one suchrecitation, even when the same claim includes the introductory phrases“one or more” or “at least one” and indefinite articles such as “a” or“an” (e.g., “a” and/or “an” should typically be interpreted to mean “atleast one” or “one or more”); the same holds true for the use ofdefinite articles used to introduce claim recitations. In addition, evenif a specific number of an introduced claim recitation is explicitlyrecited, those skilled in the art will recognize that such recitationshould typically be interpreted to mean at least the recited number(e.g., the bare recitation of “two recitations,” without othermodifiers, typically means at least two recitations, or two or morerecitations). Furthermore, in those instances where a conventionanalogous to “at least one of A, B, and C, etc.” is used, in generalsuch a construction is intended in the sense one having skill in the artwould understand the convention (e.g., “a system having at least one ofA, B, and C” would include but not be limited to systems that have Aalone, B alone, C alone, A and B together, A and C together, B and Ctogether, and/or A, B, and C together, etc.). In those instances where aconvention analogous to “at least one of A, B, or C, etc.” is used, ingeneral such a construction is intended in the sense one having skill inthe art would understand the convention (e.g., “a system having at leastone of A, B, or C” would include but not be limited to systems that haveA alone, B alone, C alone, A and B together, A and C together, B and Ctogether, and/or A, B, and C together, etc.).

The herein described aspects depict different components containedwithin, or connected with, different other components. It is to beunderstood that such depicted architectures are merely exemplary, andthat in fact many other architectures can be implemented which achievethe same functionality. In a conceptual sense, any arrangement ofcomponents to achieve the same functionality is effectively “associated”such that the desired functionality is achieved. Hence, any twocomponents herein combined to achieve a particular functionality can beseen as “associated with” each other such that the desired functionalityis achieved, irrespective of architectures or intermedial components.Likewise, any two components so associated can also be viewed as being“operably connected,” or “operably coupled,” to each other to achievethe desired functionality. Any two components capable of being soassociated can also be viewed as being “operably couplable” to eachother to achieve the desired functionality. Specific examples ofoperably couplable include but are not limited to physically mateableand/or physically interacting components and/or wirelessly interactableand/or wirelessly interacting components.

While particular aspects of the present subject matter described hereinhave been shown and described, it will be apparent to those skilled inthe art that, based upon the teachings herein, changes and modificationsmay be made without departing from this subject matter described hereinand its broader aspects and, therefore, the appended claims are toencompass within their scope all such changes and modifications as arewithin the true spirit and scope of this subject matter describedherein. Furthermore, it is to be understood that the invention isdefined by the appended claims.

1-48. (canceled)
 49. A method implemented in a computing device, themethod comprising: fetching an instruction of an instruction group forexecution by a processor having an associated hardware resource;applying a first hardware resource management policy to the fetchedinstruction of the instruction group to produce a first executioncontext, the first resource management policy being a pessimistic policythat assumes based on at least one of theoretical information orhistorical information that the given instruction group will execute ina substantially sub-optimal manner such that greater than a preselectedlevel of at least one error will occur during execution of the giveninstruction group; receiving a previously selected hardware resourcemanagement policy associated with the instruction, the previouslyselected hardware resource management policy having been selected basedon at least one of theoretical information or historical information asbeing likely to provide a substantially optimum execution of theinstruction group when the processor has a predefined execution context;selecting a newly selected hardware resource management policy using oneof the previously selected hardware resource management policy or thefirst hardware resource management policy in response to comparing thefirst and predefined execution contexts; and applying the newly selectedhardware resource management policy to the associated hardware resourceif a predetermined similarity exists between the first execution contextof the processor and the predefined execution context when the hardwareresource management policy associated with the instruction was selected.50. The method of claim 49, wherein the newly selected hardware resourcemanagement policy is stored for retrieval at a run time that isscheduled for the instruction of the instruction group.
 51. The methodof claim 49, wherein the optimistic policy assumes that less than apreselected level of at least one error will occur during execution ofthe instruction group.
 52. The method of claim 49, further comprising:facilitating execution of the instruction of an instruction group by theprocessor.
 53. The method of claim 52, wherein the facilitatingexecution of the instruction of an instruction group by the processorfurther includes: at least one of initiate, activate, cause, accomplish,allow, and/or achieve an execution of the instruction of an instructiongroup by the processor.
 54. A computing device comprising: means forreceiving an instruction of an instruction group for execution by aprocessor having an associated hardware resource; means for applying afirst hardware resource management policy to the fetched instruction ofthe instruction group to produce a first execution context, the firstresource management policy being a pessimistic policy that assumes basedon at least one of theoretical information or historical informationthat the given instruction group will execute in a substantiallysub-optimal manner such that greater than a preselected level of atleast one error will occur during execution of the given instructiongroup; means for receiving a previously selected hardware resourcemanagement policy associated with the instruction, the previouslyselected hardware resource management policy having been selected basedon at least one of theoretical information or historical information asbeing likely to provide a substantially optimum execution of theinstruction group when the processor has a predefined execution context;means for selecting a newly selected hardware resource management policyusing one of the previously selected hardware resource management policyor the first hardware resource management policy in response tocomparing the first and predefined execution contexts; and means forapplying the newly selected resource management policy to the associatedhardware resource if a predetermined similarity exists between theexecution context of the processor and the predefined execution contextexisting when the selected resource management policy was selected,wherein at least one of the means is at least partially implementedusing hardware.
 55. The computing device of claim 54, furthercomprising: means for facilitating execution of the instruction of aninstruction group by the processor.
 56. The computing device of claim54, wherein the means for receiving an instruction of an instructiongroup for execution by a processor having an associated hardwareresource further includes: means for receiving an instruction of aninstruction group for execution by a processor having an associatedhardware resource, the associated hardware resource including at leastone of a cache, a register, a functional unit, and/or a branchpredictor.
 57. One or more computer-readable storage media bearingprogram instructions that, when executed by a processing device, performa process comprising: applying an instruction of an instruction groupfor execution by a processor having an associated hardware resource;applying a first hardware resource management policy to the fetchedinstruction of the instruction group to produce a first executioncontext, the first resource management policy being a pessimistic policythat assumes based on at least one of theoretical information orhistorical information that the given instruction group will execute ina substantially sub-optimal manner such that greater than a preselectedlevel of at least one error will occur during execution of the giveninstruction group; receiving a previously selected hardware resourcemanagement policy associated with the instruction, the previouslyselected hardware resource management policy having been selected basedon at least one of theoretical information or historical information asbeing likely to provide a substantially optimum execution of theinstruction group when the processor has a predefined execution context;comparing the first execution context of the processor and thepredefined execution context to determine if a predetermined correlationexists between the first execution context and the predefined executioncontext; and applying the previously selected resource management policyto the associated hardware resource if the predetermined correlationexists between a present execution context of the processor and thepredefined execution context.
 58. The one or more computer-readablestorage media of claim 57, wherein the process further comprises:facilitating execution of the instruction of an instruction group by theprocessor.